﻿
@{

    ViewData["Title"] = "登录";

}


<html>

<head>
    <meta charset="UTF-8" />
    <title>Document</title>
    @*<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">*@
    <link rel="stylesheet" href="~/lib/layui/css/layui.css">
    <link href="~/css/login.css" rel="stylesheet" />
    <!-- 注意：如果你直接复制所有代码到本地，上述css路径需要改成你本地的 -->
</head>
<body class="login-bg">
   
    <script src="~/lib/jquery/dist/jquery.js"></script>
    <script src="~/lib/layui/layui.js" charset="utf-8"></script>
    <script src="https://pv.sohu.com/cityjson?ie=utf-8"></script>
    <!-- 注意：如果你直接复制所有代码到本地，上述 JS 路径需要改成你本地的 -->
    <div class="login layui-anim layui-anim-up">
        <div class="message">梦染后台系统</div>
        <form asp-controller="Account" asp-action="Login" method="post" class="layui-form">
            <hr class="hr15">
            <div>
                <input class="form-control" type="text" name="username" lay-verify="required" placeholder="用户名" />

            </div>
            <hr class="hr15">
            <div>
                <input class="form-control" type="password" name="password" placeholder="密码" />
            </div>
            <hr class="hr15">
            <div class="form-group">
                <input type="submit" value="登录" class="btn btn-primary" onclick="myFunction()" />
            </div>
            <hr class="hr20">
        </form>
        <span>Ps:用户名：admin，密码：123456</span>
    </div>
    <script>

        if (typeof (returnCitySN) !== "undefined") {
            var ip = returnCitySN["cip"];
            var name = returnCitySN["cname"];
            var CID = returnCitySN["cid"];
        }
        //  document.write('IP地址:' + ip + ', CID:' + CID + ', 地区:' + name + ",浏览器版本:" + getBrowserInfo());
        function getBrowserInfo() {
            var agent = navigator.userAgent.toLowerCase();

            var regStr_ie = /msie [\d.]+;/gi;
            var regStr_ff = /firefox\/[\d.]+/gi
            var regStr_chrome = /chrome\/[\d.]+/gi;
            var regStr_saf = /safari\/[\d.]+/gi;

            //IE
            if (agent.indexOf("msie") > 0) {
                return agent.match(regStr_ie);
            }

            //firefox
            if (agent.indexOf("firefox") > 0) {
                return agent.match(regStr_ff);
            }

            //Chrome
            if (agent.indexOf("chrome") > 0) {
                return agent.match(regStr_chrome);
            }

            //Safari
            if (agent.indexOf("safari") > 0 && agent.indexOf("chrome") < 0) {
                return agent.match(regStr_saf);
            }

        }
        function myFunction() {
            $.ajax({
                type: "get",
                contentType: "application/json",
                url: "/api/liuyan/Create",
                data: { "ip": ip, "cid": CID, "ipweizhi": name, "browser": getBrowserInfo },
                success: function (message) {

                }
            })
        }

    </script>




    @section Scripts {

        @{await Html.RenderPartialAsync("_ValidationScriptsPartial");}

    }
</body>
</html>
